package com.androidcourse.controller;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/okhttp")
public class OkHttpController {


    @PostMapping("/toJson")
    public  Map  toJson(@RequestBody  String json){
        Map<String, Object> data = new HashMap<>();
        data.put("code","200");
        data.put("data",json);
        return data;
    }



}
